package com.jiazhong.example.project.bookstore.front.service;

import com.jiazhong.example.project.bookstore.commons.util.JsonResult;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;

@Service
public interface ShoppingCartService {

    JsonResult addCart(String bookId, HttpServletRequest request);

    JsonResult findCartByUserId(HttpServletRequest request);

    JsonResult updateCartNumberIncrement(String bookId, HttpServletRequest request);

    JsonResult updateCartNumberDecrement(String bookId, HttpServletRequest request);

    JsonResult updateCartNumber(String bookId, int number, HttpServletRequest request);

    JsonResult removeCart(String bookId, HttpServletRequest request);

    JsonResult removeCartBatch(String[] bookIds, HttpServletRequest request);

    void scheduledBackup();
}
